-- GENERATED SPELL FOR [Uylaru] --


function spell0_21710(pUnit, Event) --@Corrupted Searing Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(38581,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_21710', 1, 1)
end

function spell1_21710(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15039,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21710', 12000, 1)
end

function Sorts_21710(pUnit, Event)
local choix_sorts_21710 = math.random(0, 1)
if choix_sorts_21710 == 0 then
pUnit:RegisterEvent('spell0_21710', 1, 1)
end
if choix_sorts_21710 == 1 then
pUnit:RegisterEvent('spell1_21710', 1, 1)
end
end

function mob21710_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21710', math.random(1500, 3000), 1)
end

function mob21710_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21710_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21710_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21710, 1, 'mob21710_Action')
RegisterUnitEvent(21710, 2, 'mob21710_Leave')
RegisterUnitEvent(21710, 3, 'mob21710_Kill')
RegisterUnitEvent(21710, 4, 'mob21710_Die')
